<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
		<div id="content">
	
		<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_guide}}/{{url_requests}}?{{rakontu.urlQuery}}{% if request_type %}&{{url_query_request_type}}={{request_type}}{% endif %}{% if not showing_all_requests %}&{{url_query_uncompleted}}={{url_option_yes}}{% endif %}" method="post" enctype="multipart/form-data">
		
		{% if changes_saved %}
			<div class="message">{{template_changes_saved}}</div>
		{% endif %}

		<p>{{template_show}}
		<select name="all_or_uncompleted">
			<option value="showAllRequests"
			{% if showing_all_requests %}
				selected="selected"
			{% endif %}
			>{{template_all_requests}}</option>
			<option value="showOnlyUncompledRequests"
			{% if not showing_all_requests %}
				selected="selected"
			{% endif %}
			>{{template_only_uncompleted_requests}}</option>
			</select>
		{{template_requests_of_the_type}}
		<select name="request_type_choice">
			{% for i in request_types|makeRangeFromListLength %}
				<option value="{{request_types_urls|listLookup:i}}"
				{% if request_types_urls|listLookup:i|equalTest:request_type %}
					selected="selected"
				{% endif %}
				>{{request_types|listLookup:i}}</option>
			{% endfor %}
			</select> 
		<input type="submit" name="changeSelections" value="{{button_change}}" class="button_small">
		</p>
		
   		{% if requests %}
  			<table cellspacing=0 cellpadding=4 style="margin-left:20px;">
  			<tr>
  				<th>{{template_entry}}</th>
  				<th>{{template_name}}</th>
  				<th>{{template_first_part_of_text}}</th>
  				<th>{{template_completed}}?</th>
  				</tr>
      		{% for request in requests %}
      			<tr>
      			<td>{{request.entry.linkString}}</td>
      			<td>{{request.linkString}}</td>
      			<td>{{request.longString_formatted|upTo:current_member.shortDisplayLength|orNbsp}}</a></td>
      			<td align="center">
  					{% if request.completedIfRequest %}
  						{{template_yes|upper}}
  						<input type="submit" name="setUncompleted|{{request.key}}" value="{{button_set_request_uncompleted}}" class="button_small">
 					{% else %}
  						{{template_no}}
  						<input type="submit" name="setCompleted|{{request.key}}" value="{{button_set_request_completed}}" class="button_small">
   					{% endif %}
 				 	<p>{{template_comment}}: 
					<input type="text" name="comment|{{request.key}}" value="{{request.completionCommentIfRequest|orNothing}}" size="20" maxlength="{{maxlength_subject_or_comment}}"></p>
  				</td>
      			</tr>
      		{% endfor %}
      		</table>
      	{% else %}
			{% if showing_all_requests %}
				<p>{{template_no_requests}}</p>
			{% else %}
				<p>{{template_no_uncompleted_requests}}</p>
			{% endif %}
      	{% endif %}
		
	</form>
	</div>
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
